feat(integrations): add Pi memory package - #1492
Open
phernandez wants to merge 2 commits into
Open
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Pi users should be able to carry Basic Memory continuity across sessions without starting over: capture the current working thread, open a fresh Pi session, and recover the decision, rationale, blocker, and next step from a real Basic Memory note.
This also proves the transport strategy from #1488: ship one Pi package with shared continuity semantics while supporting both direct Basic Memory CLI access and MCP access through the existing
pi-mcp-adapter.What Changed
integrations/pi/published as@basicmemory/pi-basic-memory./bm-status/bm-recall/bm-capturebm_recallbm_capture.pi/basic-memory.json, including CLI/MCP mode, explicit project/project-id routing, capture folder, recall timeframe, and opt-in automation settings.basic-memory-pi, that uses the package'sbm_recallandbm_capturetools.memory-notesmemory-capturememory-continuememory-tasksscripts/fetch-skills.tsandskill-references/manifest.jsonso the package refreshes bundled references from the monorepo source.docs/PI_MEMORY_*.md.just package-check-pijust package-checkandagent-harness-checkscripts/update_versions.pyImplementation Details
The Pi integration is intentionally thin. Basic Memory owns storage, search, graph operations, routing, and authentication; the Pi package owns Pi lifecycle integration, explicit capture/recall commands, and packaging.
CLI mode is the default and shells out to
bm tool ...with bounded subprocess timeouts. MCP mode does not implement a new MCP host; it registers Basic Memory withpi-mcp-adapterthrough the adapter's public runtime registration event. If the adapter is missing, the package reports a visible warning and leaves Pi usable.Automatic recall and capture default off. Users can start with explicit
/bm-recalland/bm-capturebefore opting into automation. Recalled notes are fenced as reference data, not instructions, and captures are synthesized checkpoints rather than raw transcript dumps.Testing
Passed:
That runs:
npm ci --ignore-scripts npm run fetch-skills npm run check-types npm test npm pack --dry-runAlso passed:
Manual isolated E2E evidence is recorded in
docs/PI_MEMORY_E2E_RESULTS.md:All E2E runs used temporary
BASIC_MEMORY_HOME,BASIC_MEMORY_CONFIG_DIR, Pi session directories, and throwaway Basic Memory projects.Risks / Follow-ups
transport: "mcp"; MCP mode currently exposes Basic Memory to the model viapi-mcp-adapter.